local extension = Package:new("diy")
extension.extensionName = "ts"
Fk:loadTranslationTable{
    ["diy"] = "TSdiy",
}
local stu__ts = General(extension, "stu__ts", "god", 4,4,General.Male)
local stu__god_hand = fk.CreateActiveSkill{
    name = "stu__god_hand",
    anim_type = "drawcard",
    can_use = function(self, player)
        return player:usedSkillTimes(self.name) == 0
    end,
    max_target_num=3,
    min_target_num=1,
    card_filter = function(self, to_select, selected)
        return #selected <0
    end,
    target_filter=function(self, to_select, selected, selected_cards, card)
        local player = Fk:currentRoom():getPlayerById(to_select)
        return #selected <= 2 and to_select ~= Self.id and not player:isAllNude()
    end,
    on_use = function(self, room, effect)
        local from = room:getPlayerById(effect.from)
        for _, target in ipairs(effect.tos) do
            local other=room:getPlayerById(target)
            local c = room:askForCardChosen(from, other, "hej", self.name)
            room:obtainCard(from, c, true)
            other:drawCards(1)
        end
    end,
}
local stu__god_crusade = fk.CreateTriggerSkill{
    name = "stu__god_crusade",
    anim_type = "masochism",
    events = {fk.Damage, fk.Damaged},
    frequency = Skill.Compulsory,
    can_trigger = function(self, event, target, player, data)
        return target == player and target:hasSkill(self.name) and not player.dead
    end,
    on_trigger = function(self, event, target, player, data)
        for i = 1, data.damage do
            self:doCost(event, target, player, data)
        end
    end,
    on_use = function(self, event, target, player, data)
        player.room:addPlayerMark(player, "@shenfa", 1)
        if player:getMark("@shenfa")==2 then
            player:drawCards(1)
            player.room:removePlayerMark(player, "@shenfa", 2)
        end
    end,
}
stu__ts:addSkill(stu__god_hand)
stu__ts:addSkill(stu__god_crusade)
Fk:loadTranslationTable{
    ["stu__ts"] = "汤神",
    ["stu__god_hand"] = "神之手",
    [":stu__god_hand"] = "出牌阶段，你可以至多选择三名玩家或至少选择一名玩家,拿走其一张牌，并令其抽一张牌。",
    ["stu__god_crusade"] = "神伐",
    [":stu__god_crusade"] = "锁定技，当你造成或受到伤害一点，你获得一个”神伐“标记。当你拥有两个”神伐“标记时，弃置两个”神伐“标记并摸一张牌",
    ["@shenfa"]="神伐",
    ["$stu__god_hand1"]="九伐中原，以圆先帝遗志。",
    ["$stu__god_hand2"]="日日砺剑，相报丞相厚恩。",
    ["$stu__god_hand3"]="策马纵慷慨，捐躯抗虎豺。",
    ["$stu__god_hand4"]="解甲视仇雠，竭力挽狂澜。",
    ["$stu__god_crusade1"]="举石补苍天，舍我更复其谁。",
    ["$stu__god_crusade2"]="天地同协力，何愁汉道不昌。",
    ["~stu__ts"] = "武侯遗志，已成泡影矣。",
}
return extension